<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
    var str="aga12345";//不匹配
    var str='123afasdg345';// 匹配
    var reg=/^\d+/; //数字开头，可以是多个

    </script>
</body>
</html>